import { S } from '../../s';
import { IPSDEGridColumn } from './ipsdegrid-column';
import { IPSDEGridGroupColumn } from './ipsdegrid-group-column';
import { PSDEGridColumnImpl } from './psdegrid-column-impl';

export class PSDEGridGroupColumnImpl
  extends PSDEGridColumnImpl
  implements IPSDEGridGroupColumn
{
  protected psdegridcolumns: IPSDEGridColumn[];
  getPSDEGridColumns(): IPSDEGridColumn[] | null {
    return (
      this.psdegridcolumns ||
      (this.psdegridcolumns = this.fillChildListModel(
        this.M.getPSDEGridColumns,
        S._c6,
      ) as IPSDEGridColumn[])
    );
  }

  findPSDEGridColumn(objKey: any): IPSDEGridColumn | null {
    return this.getPSModel5(
      S._c6,
      this.getPSDEGridColumns(),
      objKey,
    ) as IPSDEGridColumn;
  }
  get cls(): string {
    return 'PSDEGridGroupColumnImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._ca) return true;
    return super.instanceof(cls);
  }
}
